<?php

class Action_Field_Core extends Field
{
	public $name = 'id';
	public $url;
	public $action = 'action';
	
	public function __call($method, $args)
	{
		$this->$method = $args[0];
		return $this;
	}
	
	public function render()
	{
		return '';
	}
	
	public function __toString()
	{
		return html::anchor($this->url.'/'.$this->name, ucfirst($this->action));
	}
	
	public function put_in_cell($item)
	{
		$property = $this->name;
		return html::anchor($this->url.'/'.$item->$property, $this->action);
	}
}
